namespace WCFPointOfSaleService.Invoice
{

    using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
    using System.Collections.Generic;

    /// <summary>
    /// Summary description for Invoice.
    /// </summary>
    public partial class Invoice : Telerik.Reporting.Report
    {
        public Invoice()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        public void SetParameters(int companyID, Image logo, DataTable dtRows, string bodyHeaderPDF, string invoiceNum)
        {            
            pictureBox1.Value = logo;
            //pictureBox1.Width = Unit.Pixel(logo.Width);
            //pictureBox1.Height = Unit.Pixel(logo.Height);

            this.txtBodyHeaderPDF.Value = bodyHeaderPDF;
            this.txtInvoiceNum.Value = invoiceNum;
            
            this.DataSource = dtRows;
        }
    }
}